<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Disposition" content="attachment;">
    <title>Title</title>
</head>
<body>

<script>
    var path = 'http://ltci_handle_dev.zjhomecare.com/SysFile/ArchivesFile/06b50238-d8ee-458a-9edf-4751da3bd1ac.png' + '?response-content-type=application/octet-stream';
</script>


<a href="http://ltci_handle_dev.zjhomecare.com/SysFile/ArchivesFile/06b50238-d8ee-458a-9edf-4751da3bd1ac.png?response-content-type=application/octet-stream" download="a.jpg11" target="_blank">点击下载</a>

<a href="http://ltci_handle_dev.zjhomecare.com/SysFile/ArchivesFile/06b50238-d8ee-458a-9edf-4751da3bd1ac.png?response-content-type=application/octet-stream" download="1111">
  111 <!-- <img src="http://ltci_handle_dev.zjhomecare.com/SysFile/ArchivesFile/06b50238-d8ee-458a-9edf-4751da3bd1ac.png" alt="">-->
</a>

<img id="testImg" src="http://ltci_handle_dev.zjhomecare.com/SysFile/ArchivesFile/06b50238-d8ee-458a-9edf-4751da3bd1ac.png" alt="">
<button class="downloadBtn" type="button" οnclick="downloadImg()">下载图片</button>


<script>
    function downloadImg(){
        var img = document.getElementById('testImg'); // 获取要下载的图片
        var url = img.src;                            // 获取图片地址
        var a = document.createElement('a');          // 创建一个a节点插入的document
        var event = new MouseEvent('click')           // 模拟鼠标click点击事件
        a.download = '图片名字'                  // 设置a节点的download属性值
        a.href = url;                                 // 将图片的src赋值给a节点的href
        a.dispatchEvent(event)                        // 触发鼠标点击事件
    }
</script>

</body>
</html>